r = [{
	"faceId": "e15023ed-3deb-4117-b067-e51a0edfb70a",
	"faceRectangle": {
		"top": 343,
		"left": 140,
		"width": 92,
		"height": 92
	},
	"faceAttributes": {
		"smile": 0.001,
		"headPose": {
			"pitch": -7.1,
			"roll": 2.2,
			"yaw": 20.3
		},
		"gender": "female",
		"age": 22.0,
		"facialHair": {
			"moustache": 0.0,
			"beard": 0.0,
			"sideburns": 0.0
		},
		"glasses": "NoGlasses",
		"emotion": {
			"anger": 0.0,
			"contempt": 0.0,
			"disgust": 0.0,
			"fear": 0.0,
			"happiness": 0.001,
			"neutral": 0.999,
			"sadness": 0.0,
			"surprise": 0.0
		},
		"blur": {
			"blurLevel": "low",
			"value": 0.0
		},
		"exposure": {
			"exposureLevel": "overExposure",
			"value": 1.0
		},
		"noise": {
			"noiseLevel": "low",
			"value": 0.0
		},
		"accessories": [],
		"hair": {
			"bald": 0.05,
			"hairColor": [{
				"color": "black",
				"confidence": 1.0
			}, {
				"color": "brown",
				"confidence": 0.82
			}, {
				"color": "other",
				"confidence": 0.5
			}, {
				"color": "gray",
				"confidence": 0.31
			}, {
				"color": "red",
				"confidence": 0.05
			}, {
				"color": "blond",
				"confidence": 0.03
			}, {
				"color": "white",
				"confidence": 0.0
			}]
		}
	}
}, {
	"faceId": "a97e5ae2-3c90-4c3e-a0dc-2ab80e2bf428",
	"faceRectangle": {
		"top": 517,
		"left": 455,
		"width": 85,
		"height": 85
	},
	"faceAttributes": {
		"smile": 0.0,
		"headPose": {
			"pitch": -16.7,
			"roll": 6.1,
			"yaw": -22.4
		},
		"gender": "female",
		"age": 21.0,
		"facialHair": {
			"moustache": 0.0,
			"beard": 0.0,
			"sideburns": 0.0
		},
		"glasses": "NoGlasses",
		"emotion": {
			"anger": 0.0,
			"contempt": 0.0,
			"disgust": 0.0,
			"fear": 0.0,
			"happiness": 0.0,
			"neutral": 0.988,
			"sadness": 0.011,
			"surprise": 0.0
		},
		"blur": {
			"blurLevel": "low",
			"value": 0.0
		},
		"exposure": {
			"exposureLevel": "overExposure",
			"value": 1.0
		},
		"noise": {
			"noiseLevel": "low",
			"value": 0.0
		},

		"accessories": [],

		"hair": {
			"bald": 0.03,

			"hairColor": [{
				"color": "brown",
				"confidence": 0.98
			}, {
				"color": "black",
				"confidence": 0.92
			}, {
				"color": "gray",
				"confidence": 0.46
			}, {
				"color": "other",
				"confidence": 0.2
			}, {
				"color": "red",
				"confidence": 0.12
			}, {
				"color": "blond",
				"confidence": 0.06
			}, {
				"color": "white",
				"confidence": 0.0
			}]
		}
	}
}, {
	"faceId": "893758b2-0ef2-40a0-9a55-3197016a4e13",
	"faceRectangle": {
		"top": 325,
		"left": 301,
		"width": 71,
		"height": 71
	},
	"faceAttributes": {
		"smile": 0.0,
		"headPose": {
			"pitch": -5.8,
			"roll": -11.2,
			"yaw": -19.3
		},
		"gender": "female",
		"age": 20.0,
		"facialHair": {
			"moustache": 0.0,
			"beard": 0.0,
			"sideburns": 0.0
		},
		"glasses": "NoGlasses",
		"emotion": {
			"anger": 0.0,
			"contempt": 0.0,
			"disgust": 0.0,
			"fear": 0.0,
			"happiness": 0.0,
			"neutral": 0.999,
			"sadness": 0.001,
			"surprise": 0.0
		},
		"blur": {
			"blurLevel": "low",
			"value": 0.0
		},
		"exposure": {
			"exposureLevel": "overExposure",
			"value": 0.95
		},
		"noise": {
			"noiseLevel": "low",
			"value": 0.0
		},

		"accessories": [],

		"hair": {
			"bald": 0.01,

			"hairColor": [{
				"color": "black",
				"confidence": 0.99
			}, {
				"color": "brown",
				"confidence": 0.92
			}, {
				"color": "gray",
				"confidence": 0.55
			}, {
				"color": "other",
				"confidence": 0.31
			}, {
				"color": "blond",
				"confidence": 0.03
			}, {
				"color": "red",
				"confidence": 0.03
			}, {
				"color": "white",
				"confidence": 0.0
			}]
		}
	}
}, {
	"faceId": "1fe6949d-147f-497a-93ba-1ad750d93fa7",
	"faceRectangle": {
		"top": 307,
		"left": 545,
		"width": 69,
		"height": 69
	},
	"faceAttributes": {
		"smile": 0.0,
		"headPose": {
			"pitch": 5.9,
			"roll": -23.8,
			"yaw": 18.0
		},
		"gender": "female",
		"age": 21.0,
		"facialHair": {
			"moustache": 0.0,
			"beard": 0.0,
			"sideburns": 0.0
		},
		"glasses": "NoGlasses",
		"emotion": {
			"anger": 0.0,
			"contempt": 0.0,
			"disgust": 0.0,
			"fear": 0.0,
			"happiness": 0.0,
			"neutral": 0.998,
			"sadness": 0.0,
			"surprise": 0.002
		},
		"blur": {
			"blurLevel": "medium",
			"value": 0.26
		},
		"exposure": {
			"exposureLevel": "overExposure",
			"value": 0.98
		},
		"noise": {
			"noiseLevel": "low",
			"value": 0.22
		},

		"accessories": [],

		"hair": {
			"bald": 0.09,

			"hairColor": [{
				"color": "blond",
				"confidence": 1.0
			}, {
				"color": "gray",
				"confidence": 0.51
			}, {
				"color": "red",
				"confidence": 0.5
			}, {
				"color": "brown",
				"confidence": 0.44
			}, {
				"color": "other",
				"confidence": 0.26
			}, {
				"color": "black",
				"confidence": 0.0
			}, {
				"color": "white",
				"confidence": 0.0
			}]
		}
	}
}]
# 创建字典
glasses = {}
smile = {}
hairColor = {}
age = {}
gender = {}

# 把所有人脸的值添加进字典
count = 0
while count < len(r):
    glasses["Person{}".format(count + 1)] = r[count]['faceAttributes']['glasses']
    smile["Person{}".format(count + 1)] = r[count]['faceAttributes']['smile']
    hairColor["Person{}".format(count + 1)] = r[count]['faceAttributes']['hair']['hairColor'][0]['color']
    age["Person{}".format(count + 1)] = r[count]['faceAttributes']['age']
    gender["Person{}".format(count + 1)] = r[count]['faceAttributes']['gender']
    count += 1

# 打印字典
print("眼镜：", glasses)
print("微笑指数：", smile)
print("头发颜色：", hairColor)
print("年龄：", age)
print("性别：", gender)